<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .note-editable {
            height: 150px
        }
    </style>
</head>

<body style="color:#333;" class="gray-bg">
<!-- 标题 -->
<div class="constractP">
    <div class="page-heade">
        <h2 class="title_color text-center">合同管理-查看合同</h2>
    </div>
    <!-- 标题 -->
    <div class="">
        <form action="" class="form-inline">
            <table class="table-bordered table t_table text-center">
                <tr class="info">
                    <th class="font-bold" colspan="2">合同基本信息</th>
                </tr>
                <tr>
                    <td class="text-right" style="min-width: 140px;width: 140px">合同主题</td>
                    <td class="text-left">{$data.htzt}</td>
                </tr>
                <tr>
                    <td class="text-right" style="min-width: 140px;width: 140px">合同类型</td>
                    <td class="text-left">{$data.htlx_name}</td>
                </tr>
                <tr>
                    <td class="text-right" style="min-width: 140px;width: 140px">合同签署方</td>
                    <td class="text-left">
                        <label for="" class="font-bold">我方名称：</label>{$data.htqsf_wfmc}<br><br>
                        <label for="" class="font-bold">对方名称：</label>{$data.htqsf_dfmc}<br><br>
                    </td>
                </tr>
                <tr>
                    <td class="text-right" style="min-width: 140px;width: 140px">合同金额</td>
                    <td class="text-left">{$data.htje}元</td>
                </tr>
                <tr>
                    <td class="text-right" style="min-width: 140px;width: 140px">合同签订日期</td>
                    <td class="text-left">{$data.htqdrq}</td>
                </tr>
                <tr class="info">
                    <td class="text-left font-bold" colspan="2">
                        合同摘要
                    </td>
                </tr>
                <tr>
                    <td class="text-left" colspan="2">
                        {$data.htnrzy}
                    </td>
                </tr>
                <tr class="info">
                    <td class="text-left font-bold" colspan="2">
                        合同详情
                    </td>
                </tr>
                <tr>
                    <td class="text-left" colspan="2">
                        <div class="note-editable" style="width: 100%">
                            {$data.htxq}
                        </div>
                    </td>
                </tr>
                <tr class="info">
                    <td class="text-left font-bold" colspan="2">
                        备注
                    </td>
                </tr>
                <tr>
                    <td colspan="2">{$data.bz}</td>
                </tr>
            </table>
            <table class="table-bordered table t_table text-center">
                <tr class="info">
                    <td class="text-left font-bold" colspan="2">
                        审批意见
                    </td>
                </tr>
                <tr>
                    <td class="text-left" colspan="2">
                        行政部-人事专员<a href="javascript:;">刁小平</a> 审批动作：提交领导；审批意见：OK(审批时间：2017-10-16 14:30:06)
                    </td>
                </tr>
                <tr>
                    <td class="text-left" colspan="2">
                        行政部-人事专员<a href="javascript:;">刁小平</a> 审批动作：同意；审批意见：OK(审批时间：2017-10-16 14:30:06)
                    </td>
                </tr>
            </table>
            <table class="table-bordered table t_table">
                <tr class="info">
                    <th class="text-left font-bold">合同进度</th>
                </tr>
                <tr>
                    <td>
                        <select name="htjd" id="" class="form-control">
                            <option value="0">请选择</option>
                            <option value="1">已签订</option>
                            <option value="2">未签订</option>
                        </select>
                    </td>
                </tr>
            </table>
            <table class="table-bordered table t_table">
                <tr class="info">
                    <th class="text-left font-bold">付款进度</th>
                </tr>
                <tr>
                    <td>
                        <select name="fkjd" id="" class="form-control">
                            <option value="0">请选择</option>
                            <option value="1">未付款</option>
                            <option value="2">部分付款</option>
                            <option value="3">已付清</option>
                        </select>
                        <input name="fkje" type="text" class="form-control" style="min-width: 140px;width: 100px">元
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="" class="font-bold">付款日期：
                            <input id="contract" name="fkrq" class="laydate-icon form-control layer-date"
                                   style="min-width: 160px;width: 160px"></label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="" class="font-bold">付款凭证：
                            <input class="form-control" name="fkpz" style="min-width: 240px;width: 240px"></label>
                    </td>
                </tr>
            </table>
            <div class="row sub_btn" style="width:100%;text-align:center;padding: 20px 0">
                <input type="button" class="btn btn-success save" value="确认提交">
                <input type="button" class="btn btn-warning" value="返回" onclick="back()">
            </div>
        </form>
    </div>
</div>
<!-- 全局js -->
{include file="Public/footer"}
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>

    //确认提交
    $('.save').on('click',function () {
        var param = $(this).closest('form').serialize()
        $.post('',param,function (data) {
            if(data.success){
                swal({
                    title:data.msg,
                    type: "success"
                },function () {
                    location.href='{:url("syhtgl")}'
                })
            }else{
                swal(data.msg,'','warning')
            }
        },'json')
        return false
    })

    function back() {
        history.go(-1);
    }

    laydate({
        elem: '#contract', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
        event: 'focus' //响应事件。如果没有传入event，则按照默认的click
    });
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
</body>

</html>
